﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Content;

namespace NetworkDemo
{
    public class ScreenPopup : Screen
    {
        #region Properties
        private Rectangle popupSize;
        public Rectangle PopupSize
        {
            get { return popupSize; }
            protected set { popupSize = value; }
        }

        #endregion
        #region Fields
        Texture2D borderTexture;
        Texture2D backgroundTexture;
        #endregion

        public ScreenPopup(Texture2D background, Texture2D border, Rectangle size)
        {
            this.IsPopup = true;
            this.backgroundTexture = background;
            this.borderTexture = border;
            this.PopupSize = size;
        }

        public override void Draw(GameTime gameTime)
        {
            base.Draw(gameTime);

            SpriteBatch batch = ScreenManager.SpriteBatch;

            batch.Begin();
            DrawPopupFrame(batch, backgroundTexture, borderTexture);
            batch.End();
        }

        public void DrawPopupFrame(SpriteBatch batch, Texture2D background, Texture2D border)
        {
            batch.Draw(background, PopupSize, Color.White);
            batch.Draw(border, PopupSize, Color.White);
        }



    }
}
